﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Test2
{
    class ClockForm
    {
        public Clock myClock;
        public ClockForm(int hour, int minute)
        {
            myClock = new Clock(hour, minute);
            myClock.OnTick += OnTick;
            myClock.OnAlarm += OnAlarm;
        }
        void OnTick(object sender, TimeEventArgs args)
        {
            Console.WriteLine($"Clock Tick at[{args.Hour}, {args.Minute}, {args.Second}]");
        }
        void OnAlarm(object sender, TimeEventArgs args)
        {
            Console.WriteLine($"Clock Alarm at[{args.Hour}, {args.Minute}, {args.Second}]");
        }
    }
}
